<?php
/*
 * @Author: lokei
 * @Date: 2022-09-29 12:56:17
 * @LastEditors: lokei
 * @LastEditTime: 2022-09-29 17:55:00
 * @Description: 
 */
namespace App\Http\Controllers\Cms\Form;

use App\Common\Tools\ResultTool;
use App\Http\Controllers\Controller;
use App\Models\Cms\Form\FormRecordModel;
use Illuminate\Http\Request;

class FormController extends Controller {
    public function submit(Request $request) {
        $user = app('auth')->user();
        $form_record = new FormRecordModel();
        $form_record->uid = $user->uid;
        $form_record->content = json_encode($request->all());
        $form_record->createtime = date('Y-m-d H:i:s', time());
        $form_record->status = '0';
        $form_record->save();
        return ResultTool::success();
    }
}